package com.sundae.smarthomedemo.Activitys;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebSettings;

import com.sundae.smarthomedemo.R;
import com.tamic.jswebview.view.ProgressBarWebView;

public class ShopActivity extends BaseActivity {

    private ProgressBarWebView progressBarWebView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shop);

        Intent intent = getIntent();
        String url = intent.getStringExtra("url");

        progressBarWebView = (ProgressBarWebView) findViewById(R.id.progress_webview);

        WebSettings settings = progressBarWebView.getWebView().getSettings();
        settings.setBuiltInZoomControls(true); // 显示放大缩小 controler
        settings.setSupportZoom(true); // 可以缩放
        settings.setDefaultZoom(WebSettings.ZoomDensity.CLOSE);// 默认缩放模式
        settings.setUseWideViewPort(true);

        progressBarWebView.loadUrl(url == null ? "http://shumei.ai" : url);

    }

    @Override
    protected void onStart() {
        super.onStart();
    }

    @Override
    public void finish() {
        super.finish();
    }
}
